﻿using DapperExtensions.Mapper;
using ZLWeb.WebApiEntityBase;

namespace ZL.CRM.CommonEntity.Common
{
    public class WxShowInfo : ResponseResultInfo
    {
        /// <summary>
        ///  账户状态标识（0-正常 2-休眠）
        /// </summary>
        public short Accsta { get; set; }

        /// <summary>
        ///  状态描述
        /// </summary>
        public string Accstasm { get; set; }

        /// <summary>
        ///  折扣类别id
        /// </summary>
        public int Accdisid { get; set; }

        /// <summary>
        ///  折扣类别名称(仅用于微信卡包显示等级)（服务端读取缓存获得）
        /// </summary>
        public string Accdismc { get; set; }

        /// <summary>
        ///  总余额：现金+增值（不含红包）
        /// </summary>
        public decimal Accbalance { get; set; }

        /// <summary>
        ///  总积分：可兑换积分
        /// </summary>
        public int Accjf { get; set; }

        /// <summary>
        ///  微信会员卡卡号
        /// </summary>
        public string Wxcardno { get; set; }

        public string Ucode { get; set; } = string.Empty;

        public string Ucardid { get; set; } = string.Empty;

        /// <summary>
        /// 卡种id
        /// </summary>
        public int Acccgsid { get; set; }


    }

    public class WxShowInfoMapper : ClassMapper<WxShowInfo>
    {
        public WxShowInfoMapper()
        {
            Table("#WxShowInfo");
            Map(f => f.Accsta).Column("accsta");
            Map(f => f.Accstasm).Column("accstasm");
            Map(f => f.Accdisid).Column("accdisid");
            Map(f => f.Accdismc).Column("accdismc");
            Map(f => f.Accbalance).Column("accbalance");
            Map(f => f.Accjf).Column("accjf");
            Map(f => f.Wxcardno).Column("wxcardno");
            Map(f => f.Ucode).Column("wxcardcode");
            Map(f => f.Ucardid).Column("wxcardid");
            Map(f => f.Acccgsid).Column("acccgsid");
        }
    }
}
